//预习作业：用for重写水仙花数 这一题
package ZUOYE0420;

public class 预习作业 {

	public static void main(String[] args) {
		for (int a = 100; a < 1000; a++) {
			int b = a % 10;
			int c = a / 10 % 10;
			int d = a / 100 % 10;
			int e = b * b * b + c * c * c + d * d * d;
			if (e == a) {
				System.out.println(a);
			}
		}

	}

}
